package gui.tools;

import java.util.List;

import javax.swing.ImageIcon;

import tools.RotateTool;
import core.VectorialObject;

public class RotateToolItem extends ToolItem {

	private RotateToolSetup mToolSetup;
	
	public RotateToolItem() {

		super(new RotateTool());

		mToolSetup = new RotateToolSetup((RotateTool)this.getTool());
		
		this.setPropertiesEditor(mToolSetup);
		
		this.setName("rotate");
		
		this.setTooltip("Rotacionar figuras");
		
		ImageIcon icon = new ImageIcon(PencilToolItem.class.getResource("/imagens/rotate_ccw_16x16.png"));
	
		this.setIcon(icon);
	}

	@Override
	public void onSelection(List<VectorialObject> l) {
		mToolSetup.setEnabled(l.size() != 0);
	}

}
